<div class="payment_top">
    <a  ui-sref="tablenum"><img class="backImg" src="images/leftarrow.png"></a>
    <span class="payment_title">{{vm.tabledetail.tablename}}</span>
    <!--<img class="backImg_right" src="images/add.png">-->
</div>
<div class="usermember_center">
    <ul class="tablehome_item_detial">
        <li>
            <div style="height: 60px">
                <div class="tableitem_text_detail">桌号名称</div>
                <div class="tableitem_paint_detail">
                    <span class="tablenum_span_detail" ng-show="vm.modifytitle">{{vm.tabledetail.tablename}}</span>
                    <img class="tableitem_img" src="images/campaign/pen.png" ng-click="vm.checkTitle()" ng-show="vm.modifytitle">
                    <input class="tablenum_input tablenum_title" ng-hide="vm.modifytitle" ng-model="vm.tablename" placeholder="{{vm.tabledetail.tablename}}" ng-blur="vm.removeTitle(vm.tablename)">
                </div>
            </div>
        </li>
        <li>
            <div style="height: 60px"  ui-sref="grouplist({tableid:vm.tabledetail.tableid})">
                <div class="tableitem_text_detail">所属分组</div>
                <div class="tableitem_paint_detail" >
                    <span class="tablenum_span_detail">{{vm.tabledetail.groupname}}</span>
                    <img class="tableitem_img" src="images/rightarrow.png">
                </div>
            </div>
        </li>
    </ul>
    <div class="have_equipment" ng-show="vm.flagstatus"><span>绑定的设备</span></div>
    <ul class="tablehome_item_detial_two" ng-show="vm.flagstatus"  ng-repeat="dev in vm.devlist" >
        <li>
            <div style="height: 60px">
                <div class="tableitem_text_detail">设备号</div>
                <div class="tableitem_paint_detail">
                    <span class="tablenum_span_detail">{{dev.devid}}</span>
                </div>

            </div>
        </li>
        <li>
            <div style="height: 60px">
                <div class="tableitem_text_detail" data-ng-init="vm.getDevInline(dev)">在线状态</div>
                <div class="tableitem_paint_detail">
                    <span class="tablenum_span_detail">{{dev.status |stautusFiter}}</span>
                </div>
            </div>
        </li>
        <li>
            <div style="height: 60px">
                <div class="tableitem_text_detail" data-ng-init="vm.getDevDetail(dev)">设备状态</div>
                <div class="tableitem_paint_detail">
                    <span class="tablenum_span_detail">{{dev.statusEletricity | chargestatusFilter}}</span>
                </div>
            </div>
        </li>
        <li>
            <div style="height: 60px" ng-click="vm.openModal(dev)">
                <div class="tableitem_text_detail">设备解绑</div>
                <div class="tableitem_paint_detail">
                    <img class="tableitem_img" src="images/rightarrow.png">
                </div>
            </div>
        </li>
        <!--<li>-->
            <!--<div style="height: 60px">-->
                <!--<div class="tableitem_text_detail"  ng-click="vm.changeModal(dev)">设备换绑</div>-->
                <!--<div class="tableitem_paint_detail">-->
                    <!--<img class="tableitem_img" src="images/rightarrow.png">-->
                <!--</div>-->
            <!--</div>-->
        <!--</li>-->
        <li ng-click="vm.searchDev(dev)">
            <div style="height: 60px" >
                <div class="tableitem_text_detail">查找设备</div>
            </div>
        </li>
    </ul>
    <div class="add_equipment" style="margin-top: 20px;margin-bottom: 0" ng-hide="vm.devlist.length>0" ui-sref="scanning({tableid:vm.tabledetail.tableid})">
        <div style="height: 60px;">
            <div class="tableitem_text_detail">添加设备</div>
        </div>
    </div>
    <div class="add_equipment" ng-show="vm.devlist.length>0" style="margin-top: 1px" ui-sref="mealcode({tableid:vm.tabledetail.tableid})">
        <div style="height: 60px;">
            <div class="tableitem_text_detail">桌台二维码</div>
        </div>
    </div>
    <div class="inputsn_outbtn_detail">
        <button id="deletebtn" class="inputsn_btn_detail" ng-click="vm.openDeleteTable()" >删除桌台</button>
    </div>
</div>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" style="margin-top: 65px">
    <div class="modal-dialog modal_content" role="document">
        <div class="modal-content model_content_sub">
            <div class="modal-body">
                解绑后，该桌子将没有绑定的桌牌！
            </div>
            <div class="margin_top_none">
                <button  id="cancelbtn" type="button" class="detail_btn detail_btn_active" data-dismiss="modal">取消</button>
                <button id="updatesure" type="button" class=" detail_btn"  ng-click="vm.unBinding()">解绑</button>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="changeModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" style="margin-top: 65px">
    <div class="modal-dialog modal_content" role="document">
        <div class="modal-content model_content_sub">
            <div class="modal-body">
                <input id="inputname" class="tablenum_input" placeholder="输入设备号" ng-model="vm.devid" >
            </div>
            <div class="margin_top_none">
                <button id="canceltwo" type="button" class="detail_btn detail_btn_active" data-dismiss="modal">取消</button>
                <button id="suretwo" type="button" class=" detail_btn"  ng-click="vm.changeBinding()">换绑</button>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="deletetableModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" style="margin-top: 65px">
    <div class="modal-dialog modal_content" role="document">
        <div class="modal-content model_content_sub">
            <div class="modal-body">
               确定删除么？
            </div>
            <div class="margin_top_none">
                <button type="button" class="detail_btn detail_btn_active" data-dismiss="modal">取消</button>
                <button id="detailsure" type="button" class=" detail_btn" data-dismiss="modal" ng-click="vm.deleteTable()">确定</button>
            </div>
        </div>
    </div>
</div>
<message-Component message-visible="vm.messageVisible" message="vm.message"  surebtn="vm.sureBtn()"
                   cancelbtn="vm.cancelBtn()"></message-Component>
